//
//  IndexCollectionViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/7/11.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "IndexCollectionViewCell.h"

@implementation IndexCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self.contentView addSubview:self.img];
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.moreImg];
        self.backgroundColor = SFMWhiteColor;
        self.layer.cornerRadius = 3;
        self.clipsToBounds = YES;
    }
    return self;
}

-(UIImageView *)img
{
    if (_img == nil) {
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(15, 23, 32, 32)];
        _img.contentMode = UIViewContentModeScaleAspectFit;
    }
    return _img;
}

-(UILabel *)titleLabel
{
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 74, WIDTH/2 - 70 , 20)];
        _titleLabel.font = font(16);
        _titleLabel.textColor = SFMColor(68, 68, 68);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _titleLabel;
}

-(UIImageView *)moreImg
{
    if (_moreImg == nil) {
        _moreImg = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH/2 - 44, 76, 8, 13)];
        _moreImg.contentMode = UIViewContentModeScaleAspectFit;
        _moreImg.image = [UIImage imageNamed:@"back"];
    }
    return _moreImg;
}

@end
